﻿using HcyWpfApp1.View;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace HcyWpfApp1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void DataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {

        }

        private void OpenExDir_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("sss11");
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {

        }

        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            UserInfo frmUserInfo = new UserInfo();
            frmUserInfo.Show();
            //addTabl(((System.Windows.Controls.HeaderedItemsControl)sender).Header.ToString());
        }

        private async void addTabl(string header) {
            if(!this.tab_main.Items.Contains(header)){ 
                TabItem tabItem=new TabItem();
                tabItem.Header=header;

                UserInfo frmUserInfo = new UserInfo();
               //tabItem.Content= frmUserInfo.Content;

                this.tab_main.Items.Add(header);
                this.tab_main.SelectedItem=header;
            }
        }

        private void MenuItem_ClickTest(object sender, RoutedEventArgs e)
        {
            TestPoint testPoint=new TestPoint();
            testPoint.Show();
        }


    }
}
